﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

namespace 俄罗斯方块
{
    public abstract class Shape
    {
        private Box[] boxes;
        
        internal Box[] Boxes { get => boxes; set => boxes = value; }
        public int x;
        public int y;
        public int col;
        public int row;
        public Color color;
       
        public void move(int x,int y)
        {
            this.x += x;
            this.y += y;
            
        }
        public  void change()
        {
            for (int i = 0; i < Boxes.Length; i++)
            {

                int temp = Boxes[i].y;
                Boxes[i].y = Boxes[i].x;
                Boxes[i].x = row - temp;


            }
            swap(ref row, ref col);

        }
        void swap(ref int a, ref int b)
        {
            int temp = a;
            a = b;
            b = temp;
        }

    }
}
